{# 
  This page grabs data from _data/docs/${project_key}/toc.yml. (The `page.fileSlug` value will also
  work, as the URL for this page looks like "/en/docs/{project_key}".)
  For each page in the set of links, it fetches the page's frontmatter and uses that to render the
  title and summary for the page.
#}

{% extends "layouts/base.njk" %}

{% block title_bar %}
  {% include 'partials/breadcrumbs.njk' %}
{% endblock %}

{% block content %}
  <div class="gap-top-300 lg:gap-top-400 pad-left-400 pad-right-400">
    <div class="project-hero center-margin text-align-center">
      {% from 'macros/project-icon.njk' import projectIcon with context %}
      {{ projectIcon(project_key) }}
      <h1 class="type--h4 lg:gap-top-400">{{ title }}</h1>
      <p class="type gap-top-300">{{ description }}</p>
    </div>

    {# Render nested sections. #}
    {% import 'macros/project-sections.njk' as macros with context %}
    <div class="project-sections gap-top-800">
      {# toc defines the table of contents that appears to the left of the documentation. #}
      {% set toc = docs[project_key].toc %}
      {{ macros.projectSections(toc) }}
    </div>
  </div>
{% endblock %}